package com.cxg.allsys.adminsys.service.impl;

import com.cxg.allsys.adminsys.mapper.MemberMapper;

import com.cxg.allsys.adminsys.pojo.Member;
import com.cxg.allsys.adminsys.service.IMemberService;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Slf4j
@Data
@Service
public class MemberServiceImpl implements IMemberService {
    @Autowired
    private MemberMapper memberMapper;
    @Override
    public boolean updateStatus(Integer memid, String auditBy, String status) {
        try {
            memberMapper.updateStatus(memid,auditBy,status);
            return true;
        } catch (Exception e) {

            return false;
        }
    }

    @Override
    public List<Member> query(Integer pageIndex, Integer pageSize, String querStr) {
        return memberMapper.select(pageIndex,pageSize,querStr);
    }

    @Override
    public boolean save(Member member) {
        log.info("service save 方法实现类");
        try {
            log.info("输入内容打印："+member.toString());
            memberMapper.insert(member);
            return true;
        } catch (Exception e) {
            return false;
        }
    }

    @Override
    public boolean deleteMember(Member member) {
        log.info("service delectExpert 方法实现类");
        try {
            log.info("输入内容打印："+member.toString());
            memberMapper.deleteMember(member);
            return true;
        } catch (Exception e) {
            return false;
        }
    }


}




























